projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05b98ec
)
x86: Do sanity test on pirq table before writing
author
Bin Meng
<
[email protected]
>
Mon, 25 May 2015 14:35:07 +0000
(22:35 +0800)
committer
Simon Glass
<
[email protected]
>
Thu, 4 Jun 2015 08:39:39 +0000
(
02:39
-0600)
If pirq_routing_table points to NULL, that means U-Boot fails to
generate the table before in create_pirq_routing_table(), so we
test it against NULL before actually writing it.
Signed-off-by: Bin Meng <
[email protected]
>
Acked-by: Simon Glass <
[email protected]
>
arch/x86/cpu/irq.c
patch
|
blob
|
history
diff --git
a/arch/x86/cpu/irq.c
b/arch/x86/cpu/irq.c
index d1711af8f843df46a2c50bd1a2447b5744340c38..74b89ad2ff6c08d4b63fbc4b0244bcf6d13c6d92 100644
(file)
--- a/
arch/x86/cpu/irq.c
+++ b/
arch/x86/cpu/irq.c
@@
-209,5
+209,8
@@
void pirq_init(void)
u32 write_pirq_routing_table(u32 addr)
{
+ if (!pirq_routing_table)
+ return addr;
+
return copy_pirq_routing_table(addr, pirq_routing_table);
}